From: Samuel Thibault Date: Sun, 17 Sep 2017 01:56:00 +0000 (+0100) Subject: format X-Git-Tag: archive/raspbian/1.11.9-1+rpi1~2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d5af8720f30e1cb631c56cd426ee758bcc98408f;p=hwloc.git format commit 9d6e8bfe26c24df8272d6af782ebbde9ef62acb0 Author: Samuel Thibault Date: Wed Sep 6 17:35:56 2017 +0200 Avoid letting snprintf interpret process name as format Gbp-Pq: Name format --- diff --git a/utils/lstopo/lstopo.c b/utils/lstopo/lstopo.c index a239800..e9d600d 100644 --- a/utils/lstopo/lstopo.c +++ b/utils/lstopo/lstopo.c @@ -229,7 +229,7 @@ static void add_process_objects(hwloc_topology_t topology) if (!parenl) { snprintf(comm, sizeof(comm), "(unknown)"); } else { - snprintf(comm, sizeof(comm), parenl+1); + snprintf(comm, sizeof(comm), "%s", parenl+1); } }